//
//  requestData.h
//  jiulongLJ
//
//  Created by MyMac on 15/4/2.
//  Copyright (c) 2015年 MyMac. All rights reserved.
//

#import <Foundation/Foundation.h>

typedef void(^DownloadFinishedBlock) (id response);
typedef void(^DownloadFailedBlock) (NSString*error);
@interface RequestData : NSObject<NSURLConnectionDataDelegate>

+ (void)afPostRequestWithUrlString:(NSString *)urlString parms:(id)parms finishedBlock:(DownloadFinishedBlock)finished failedBlock:(DownloadFailedBlock)failed;
-(void)cancelRequest;

-(void)systemReceiveImageUrl:(NSString*)url finishedBlock:(DownloadFinishedBlock)finishedBlock andfailedBlico:(DownloadFailedBlock)failedBlock;
-(void)requestDownDataUrl:(NSString*)url andfileName:(NSString*)name andfileType:(NSString*)type andfinishedBlock:(DownloadFinishedBlock)finishedBlock andfailed:(DownloadFailedBlock)failedBlock;

+(NSURLResponse*)requestfileResponse:(NSString*)url;
@end
